<template>
    <div id='myChart' style='width:100%;max-height:400px;min-height: 300px;'></div>

</template>

<script>
    export default {
        name: "temperature",
        data(){
            return{

            }
        },
        mounted() {
            this.drawLine();
        },
        methods:{
            drawLine(){
                let myChart = this.$echarts.init(document.getElementById('myChart'))
                // 绘制图表
                myChart.setOption({
                    title: { text: '实时轨温',x:'center' },
                    tooltip: {},
                    xAxis: {
                        type:'category',
                        data: ["11:30","12:00","12:30","13:00","13:30","14:00"]
                    },
                    yAxis: {},
                    series: [{
                        name: '摄氏度',
                        type: 'line',
                        data: ["19.2", 20, '36.2', 25, 25.7, 20]
                    }]
                });

            }
        }
    }

</script>

<style scoped>

</style>
